//
//  MessageCell.m
//  SP2P
//
//  Created by 吴建东 on 16/2/29.
//  Copyright © 2016年 EIMS. All rights reserved.
//

#import "MessageCell.h"
#import "MessageModel.h"

@interface MessageCell ()
@property (nonatomic, strong) id object;
@end

@implementation MessageCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
    _titleLabel.textColor = KBlackColor;
    _titleLabel.font = KFontBoldSize(15);
    _timeLabel.font = KFontSize(11);
    _detailLabel.font = KFontSize(13);
    _detailLabel.numberOfLines = 2;
}

- (void)layoutSubviews {
    if (self.object) {
        MessageModel *model = (MessageModel *)self.object;
        
        self.titleLabel.text = [NSString stringWithFormat:@"%@",model.title];
        self.timeLabel.text = [NSString stringWithFormat:@"%@",model.detailTimes];
        self.detailLabel.text = [NSString stringWithFormat:@"%@",model.content];
        self.unreadmageView.hidden = YES;
    }
}

- (void)fillCellWithObject:(id)object {
    self.object = object;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
